package com.dingding.user.core.passenger.user.dao.impl;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import com.dingding.common.core.base.daox.AbstractBaseInjectionDao;
import com.dingding.user.core.passenger.user.dao.IPassengerUserInfoDao;
import com.dingding.user.core.passenger.user.dao.sql.PassengerUserInfoDaoSQL;

/**
 * 
 * @Description: 乘客端用户信息操作DAO
 * @author CHEHUANBO
 * @date 2016年12月23日
 * @version V2.6.4
 * 
 */
@Component("passengerUserInfoDao")
public class PassengerUserInfoDaoImpl extends AbstractBaseInjectionDao implements IPassengerUserInfoDao {

	/**
	 * 
	 * @Description: 修改优惠券数量
	 * @param updateType
	 *            1：数量减1 2:数量加1
	 * @param userId
	 *            用户ID
	 * @author CHEHUANBO
	 * @version V2.6.4
	 * 
	 */
	@Override
	@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = RuntimeException.class)
	public void updateUserCouponNumber(int updateType, String userId) throws RuntimeException {
		super.getSqlBaseDao().updateSqLRow(PassengerUserInfoDaoSQL.update_User_Coupon_Number(updateType), userId);
	}

}
